package com.weipt;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

/**
 * @author peter.wei 2020/08/31 17:27
 * @version 1.0
 * @company 终生学习
 * @description <br>peter.wei 2020/08/31 17:27
 **/
public enum Single5 {
    instance;

    public Single5 getInstance(){
        //do something
        return instance;
    }

}

class Test3{
    public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {
        Constructor<Single5> declaredConstructor = Single5.class.getDeclaredConstructor(null);
        declaredConstructor.setAccessible(true);
        System.out.println(declaredConstructor.newInstance());
    }
}
